package com.sghd.candy.module.player.facade;

import com.sghd.common.socket.anno.InBody;
import com.sghd.common.socket.anno.InSession;
import com.sghd.common.socket.anno.SocketCommand;
import com.sghd.common.socket.anno.SocketModule;
import com.sghd.pojo.candy.player.vo.BaseReq;
import com.sghd.pojo.candy.player.vo.InitVo;
import com.sghd.pojo.candy.player.vo.ReqPlayerVo;
import com.sghd.pojo.fight.game.PlayerVo;
import com.sghd.pojo.fight.game.Result;

import static com.sghd.candy.utils.SocketEnum.*;
import static com.sghd.common.socket.session.SessionKeys.IDENTITY;
import static com.sghd.common.socket.session.SessionKeys.MANAGEMENT;
/**
 * 玩家模块
 * @author Allen
 * @date 2018/12/06
 */
@SocketModule()
public interface PlayerFacade {

    /**
     * 获取初始化玩家信息
     * @param playerId
     * @return
     */
    @SocketCommand(INIT_INFO)
    InitVo getInitInfo(@InSession(IDENTITY) long playerId);

    /**
     * 获取战斗玩家信息
     * @param ip
     * @param req
     * @return
     */
    @SocketCommand(FIGHT_PLAYER_INFO)
    PlayerVo getFightPlayerInfo(@InSession(MANAGEMENT) String ip, ReqPlayerVo req);

    /**
     * 修改玩家头像
     * @param playerId
     * @param headIcon
     * @return
     */
    @SocketCommand(MODIFY_HEADICON)
    Result<String> modifyHeadIcon(@InSession(IDENTITY) long playerId, @InBody("headIcon") Integer headIcon);

    /**
     * 重命名
     * @param playerId
     * @param nickName
     * @return
     */
    @SocketCommand(RENAME)
    Result<String> rename(@InSession(IDENTITY) long playerId, @InBody("nickName") String nickName);

    /**
     * 新手引导进度
     * @param playerId
     * @param guide
     * @return
     */
    @SocketCommand(PLAYER_GUIDE)
    Result<String> guide(@InSession(IDENTITY) long playerId, @InBody("guide") Integer guide);

}
